<extend name="Public/base" />
<block name="content">
<div id="content">
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.config.all.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="__STATIC__/ueditor/ueditor.all.min.js"></script>
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/css/webuploader.css" />
<link rel="stylesheet" type="text/css" href="__STATIC__/webuploader/css/style.css" />
<style>
#header{margin-top:0px;}
</style>
	<div id="content-header">
		<div id="breadcrumb">
			<a class="tip-bottom" href="{:U('Index/index')}" data-original-title="首页"><i class="icon-home"></i> 首页</a>
			<a class="tip-bottom" href="{:U('Service/index')}" data-original-title="">{$meta_title_c}</a> 
			<a class="current" href="{$post_url}">{$meta_title}</a>
		</div>
	</div>
	<div class="container-fluid">
		<br/>
		<div class="row-fluid">
			<div class="span12">
				<div class="widget-box">
					<div class="widget-title">
						<span class="icon"> <i class="icon-align-justify"></i>
						</span>
						<h5>{$meta_title}</h5>
					</div>
					<div class="widget-content nopadding">
						<form class="form-horizontal" method="post" action="">
							<!-- 基础信息 -->
							<label class="control-label" style="width:100px;"><font color="red">*</font>神秘之旅:</label>
							<div class="control-group" style="width:180px; float:left; margin-left:20px;">
								<div class="controls" style="margin-left:0px;">
									<select class="form-control" style="width: 180px;" name="activity_id" id="activity_id" onchange="change_merchant(activity_id, '{:U('Shop/getActivityMerchant')}')">
										<option value=0>选择活动</option>
										<volist name="activity_list" id="vo">
											<option value='{$vo.activity_id}'>{$vo.activity_name|strip_tags}</option>
										</volist>
										{$Think.config.ACTIVITY_TTTM}
									</select>
								</div>
							</div>
							<div class="control-group" style="width:180px; float:left; margin-left:10px;">
								<div class="controls" style="margin-left:0px;">
									<select class="form-control" style="width: 180px;" name="merchant_id" id="merchant_id" onchange="change_shop(activity_id,merchant_id, '{:U('Shop/getMerchantShop')}')">
										<option value=0>选择商户</option>
									<volist name="merchant_list" id="vo">
										<option value='{$vo.merchant_id}'>{$vo.merchant_name|strip_tags}</option>
									</volist>
									</select>
								</div>
							</div>
							<div class="control-group" style="width:180px; float:left; margin-left:10px;">
								<div class="controls" style="margin-left:0px;">
									<select class="form-control" style="width: 180px;" name="shop_id" id="shop_id">
										<option value=0>选择店铺</option>
										<volist name="shop_list" id="vo">
											<option value='{$vo.shop_id}'>{$vo.shop_name|strip_tags}</option>
										</volist>
									</select>
								</div>
							</div>
							<!-- /基础信息 -->
							<!-- 分类&状态 -->
							<div class="control-group" style=" width:180px;float:left; margin-left:10px;">
							  	<div class="controls" style="margin-left:0px;">
									<select class="form-control" style="width: 180px; float:left;" name="customer_service_type" id="customer_service_type">
										<option value=0>请选择投诉分类</option>
										<volist name=":C('CUSTOMER_SERVICE_TYPE')" id='vo'>
											<option value="{$key}">{$vo|strip_tags}</option>
										</volist>
									</select>
								</div>
							</div>
							<div class="control-group" style=" width:180px;float:left; margin-left:10px;">
								<div class="controls" style="margin-left:0px;">
									<select class="form-control" style="width: 180px; float:left;" name="customer_service_status" id="customer_service_status">
										<option value=0>请选择处理状态</option>
										<volist name=":C('CUSTOMER_SERVICE_STATUS')" id='vo'>
											<option value="{$key}">{$vo|strip_tags}</option>
										</volist>
									</select>
								</div>
							</div>
							<!-- /分类&状态 -->
					
							<div class="control-group" style="clear:both;">
								<label class="control-label" style="width:100px;">客户信息:</label>
								<div class="controls" style=" margin-left:120px;">
									<input  type="text" placeholder="客户姓名" class="ui-wizard-content span3" maxlength="15" name="customer_service_name" value="{$info.customer_service_name|htmlspecialchars}" >
									<input  type="text" placeholder="客户电话" class="ui-wizard-content span3" maxlength="15" name="customer_service_mobile" value="{$info.customer_service_mobile|htmlspecialchars}" >
									<input  type="text" placeholder="纸质订单号" class="ui-wizard-content span3" maxlength="15" name="customer_service_order_num" value="{$info.customer_service_order_num|htmlspecialchars}" >
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" style="width:100px;">问题:</label>
								<div class="controls" style="width:81%; margin-left:120px; ">
								    <textarea id="container" style="border:0px" name="customer_service_title" type="text/plain">{$info.customer_service_title}</textarea>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" style="width:100px;">进程:</label>
								<div class="controls" style="width:81%; margin-left:120px; ">
								    <textarea id="container2" style="border:0px" name="customer_service_content" type="text/plain">{$info.customer_service_content}</textarea>
								</div>
							</div>
							<div class="form-actions">
								<button class="btn btn-success" type="submit">提交</button>
							</div>
							<input type="hidden" name="customer_service_id" value="{$info.customer_service_id}"/>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>

<script type="text/javascript">
$(document).ready(function(){
	//设置下拉框选中
	set_value("activity_id",'{$info.activity_id|default=0}');
	set_value("merchant_id",'{$info.merchant_id|default=0}');
	set_value("shop_id",'{$info.shop_id|default=0}');
	set_value("customer_service_type",'{$info.customer_service_type|default=0}');
	set_value("customer_service_status",'{$info.customer_service_status|default=0}');
	
	//初始化登录用户名输入焦点
	tke_form_focus();
	$("form").submit(function(){
		//锁定登录按钮
		$('button').attr('disabled',true);
		var self = $(this);
		$.post("{$post_url}", self.serialize(), call_back, "json");
		return false;
		
		/**
		 * @todo 接收登录返回值
		 * @author PHP@妖孽 <dino_ma@163.com>
		 */
		function call_back(data){
			if(data.status==1){
				tke_alert(data.info,'alert-success');
				setTimeout(function(){
				  if (data.url) {
						location.href=data.url;
					}else{
						location.reload();
					}
				},1500);
			} else {
				$('button').attr('disabled',false);
				tke_alert(data.info,'alert-error');
			}
		}
	});
	highlight_subnav("{:U('Service/index')}");//导航高亮
	//ueditor
	var ue = UE.getEditor('container',{
	    allowDivTransToP: false,
	    initialFrameHeight: 120,
	    autoHeightEnabled:false,
	    toolbars: [
			['fullscreen', 'source', 'undo', 'redo', 'bold', 'italic', 'underline', 'fontborder', 'backcolor', 'fontsize', 'fontfamily', 'justifyleft', 'justifyright', 'justifycenter', 'justifyjustify', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', 'link', 'unlink','simpleupload','insertimage']
		]
	});
	var ue2 = UE.getEditor('container2',{
	    allowDivTransToP: false,
	    initialFrameHeight: 120,
	    autoHeightEnabled:false,
	    toolbars: [
			['fullscreen', 'source', 'undo', 'redo', 'bold', 'italic', 'underline', 'fontborder', 'backcolor', 'fontsize', 'fontfamily', 'justifyleft', 'justifyright', 'justifycenter', 'justifyjustify', 'strikethrough', 'superscript', 'subscript', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall', 'cleardoc', 'link', 'unlink','simpleupload','insertimage']
		]
	});
	
});
</script>
<script type="text/javascript" src="__STATIC__/webuploader/js/webuploader.nolog.js"></script>
</block>